<%-- 
    Document   : ResultHotel
    Created on : Nov 2, 2011, 12:10:03 AM
    Author     : MrKoi
--%>

<%@page import="DAL.HotelBean"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ page session="true" import="java.util.Collection" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="f" %>
<%@ taglib uri="/WEB-INF/taglib139.tld" prefix="pg" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>East2West Tours and Travels</title>
        <style type="text/css">
           .khunhotel
            {
                 width:648px;
                height:895px;
                background-color:#f0f3ec;
            }
            .font
            {
            font-family:"Times New Roman", Times, serif;
            font-size:x-large;
            font-weight:bold;
            width:200px;
            margin-top:0px;
            color:#0707e7;
            margin-left:auto;
            margin-right:auto;
            }
            .center
            {
                margin-top:10px;
                margin-left:auto;
                margin-right:auto;
            }
        </style>
    </head>
    <body>
        <%
        String namecity=session.getAttribute("namecity").toString();
        String priceform=session.getAttribute("priceform").toString();
        String priceto=session.getAttribute("priceto").toString();
        
        HotelBean cb=new HotelBean();
        Collection cl1=cb.SearchHotel(namecity,priceform,priceto);
        request.setAttribute("lc",cl1);
        if(cl1.size() >0)
            {
        %>
        <div class="khunhotel">
            <div class="font">List Of Hotels</div>    
            <br><br>
            <table width="648px" id="Table">  
                <pg:paging pageSize="4" url="index.jsp?page=ListHotels">
                    <c:forEach items="${lc}" var="cr">
                        <pg:item>
                            <tr>
                                <td width="60px" rowspan="6"><img src="${cr.image}" width="150px" height="150px" /></td>
                                <td><b>Name City:</b> ${cr.nameCity}</td>
                            </tr>
                            <tr>
                                <td><b>Name Hotel:</b> ${cr.hotelName}</td>
                            </tr>
                            <tr>
                                <td><b>Address:</b> ${cr.address}</td>
                            </tr>
                            <tr>
                                <td><b>Standard:</b> ${cr.standard}</td>
                            </tr>
                            <tr>
                                <td><b>Price:</b><font color="red"> <f:formatNumber value="${cr.price}" pattern="$#,###"/></font></td>
                            </tr>
                            <tr>
                                <td>&nbsp;</td>
                            </tr>
                            <tr>
                                <td colspan="6"><hr></td>
                            </tr>
                        </pg:item>       
                    </c:forEach>
                    <pg:index>
                        <pg:page><%=thisPage%></pg:page>
                    </pg:index>
                </pg:paging>
            </table>
        </div>
        <%
        }else
            {
            %>
             <div class="font center">Not Found!</div>    
            <%
            }
        %>
    </body>
</html>